# -*- codeing = utf-8 -*-
# @Time : 2021/2/21 16:27
# @Atuthor: 朱朱
# @File: 021赋值运算符.py
# @Software: PyCharm
""
"""
# = 等号(赋值运算符)作用是将 = 右边的值赋值给 = 的变量
# = 等号的左边一定不能是常量或者表达式
# 复合赋值运算符 +=  -=  *=  /=  **=  //=  %=
"""
# 等号连接的变量可以传递赋值
a = b = c = d = 55
print(a,b,c,d)

# 拆包
m,n = 3,5
print(m,n)

# 拆包时，变量的个数和值的个数不一致，会报错
# y, z = 1, 2, 3, 4, 5
# print(y, z)
# o, p, q = 4, 2
# print(o, p, q)

# * 表示可变长度
o,*p,q = 1,2,3,4,5,6
print(o,p,q)    # 1 [2, 3, 4] 5

*o, p, q = 1, 2, 3, 4, 5, 6
print(o, p, q)  # [1, 2, 3, 4] 5 6


o, p, *q = 1, 2, 3, 4, 5, 6
print(o, p, q)  # 1 2 [3, 4, 5, 6]